<h1>Xét duyệt</h1>


<h4> Thông tin hồ sơ </h4>
<?php $hoso = $this->result_edit; ?>
<div id="box_hs">

	<p><span class="tit_hs"> Mã số:  </span> <span class="con_hs"> <?php echo $hoso['maso'] ;?> </span> </p>
	<p><span class="tit_hs"> Tên hồ sơ: </span> <span class="con_hs"><?php echo $hoso['namehoso'] ;?>  </span> </p>
	<p><span class="tit_hs"> Họ và tên: </span> <span class="con_hs"><?php echo $hoso['hovaten'] ;?>  </span> </p>
	<p><span class="tit_hs"> Email: </span> <span class="con_hs"><?php echo $hoso['email'] ;?>  </span> </p>
	<p><span class="tit_hs"> Số điện thoại:  </span> <span class="con_hs"> <?php echo $hoso['sodienthoai'] ;?> </span> </p>
	<p><span class="tit_hs"> Thời gian liên lạc:  </span> <span class="con_hs"> <?php echo $hoso['tglienlac'] ;?> </span> </p>
	<p><span class="tit_hs"> Chứng minh nhân dân:  </span> <span class="con_hs"> <?php echo $hoso['cmnd'] ;?> </span> </p>
	<p><span class="tit_hs"> Ngày cấp:  </span> <span class="con_hs"> <?php echo $hoso['ngaycap'] ;?> </span> </p>
	<p><span class="tit_hs"> Nơi cấp:  </span> <span class="con_hs"> <?php echo $hoso['noicap'] ;?> </span> </p>

	<p><span class="tit_hs"> Số tiền vay:  </span> <span class="con_hs"> <?php echo filterInt($hoso['sotienvay']) ;?> </span> </p>
	<p><span class="tit_hs"> Thời gian vay:  </span> <span class="con_hs"> <?php echo filterInt($hoso['thoigianvay']) ;?> Tháng </span> </p>
	<p><span class="tit_hs"> Lương:  </span> <span class="con_hs"> <?php echo filterInt($hoso['luong']) ;?> </span> </p>
	<p><span class="tit_hs"> Thuê nhà xe:  </span> <span class="con_hs"> <?php echo filterInt($hoso['thuenhaxe']) ;?> </span> </p>
	<p><span class="tit_hs"> Hộ kinh doanh:  </span> <span class="con_hs"> <?php echo filterInt($hoso['hokinhdoanh']) ;?> </span> </p>
	<p><span class="tit_hs"> Doanh nghiệp riêng:  </span> <span class="con_hs"> <?php echo filterInt($hoso['doanhnghieprieng']) ;?> </span> </p>
	<p><span class="tit_hs"> Thu nhập khác:  </span> <span class="con_hs"> <?php echo filterInt($hoso['thunhapkhac']);?> </span> </p>
	<p><span class="tit_hs"> Quận huyện:  </span> <span class="con_hs"> <?php echo $hoso['quanhuyen'];?> </span> </p>

	<p><span class="tit_hs"> Xe ô tô:  </span> <span class="con_hs"> <?php echo filterInt($hoso['tsdb1']) ;?> </span> </p>
	<p><span class="tit_hs"> Bất động sản:  </span> <span class="con_hs"> <?php echo filterInt($hoso['tscd1']) ;?> </span> </p>
	<?php if($hoso['loai_tscd1']==0) $hoso['loai_tscd1'] = "Sổ đỏ / sổ hồng";
			else $hoso['loai_tscd1'] = "Hợp đồng mua bán";
	?> 
	<p><span class="tit_hs"> Loại bds:  </span> <span class="con_hs"> <?php echo $hoso['loai_tscd1'] ;?> </span> </p>
	<p><span class="tit_hs"> Dự án:  </span> <span class="con_hs"> <?php echo $hoso['duan'] ;?> </span> </p>
	<p><span class="tit_hs"> Thời gian đăng ký:  </span> <span class="con_hs"> <?php echo $hoso['startdate'] ;?> </span> </p>

</div>


<?php

echo $this->form;

/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
?>

<?php
//funtion re money 
function filterInt($str) {
		$len = strlen($str);
		$dem = ceil($len / 3);
		$number ='';
		if(($len % 3)==1){
			
				$strtop = substr($str,0,1);
				$strmain = substr($str,1);
				$str = $strmain;
				$number .= $strtop;
				for($i=0;$i<$dem-1;$i++){
					$strend = substr($str,0,3);
					$strmain = substr($str,3);
					$str = $strmain;
					if($i != $len-1) $number .= '.'.$strend;
					
				}
		}
		if(($len % 3)==2){
			
				$strtop = substr($str,0,2);
				$strmain = substr($str,2);
				$str = $strmain;
				$number .= $strtop;
				for($i=0;$i<$dem-1;$i++){
					$strend = substr($str,0,3);
					$strmain = substr($str,3);
					$str = $strmain;
					if($i != $len-1) $number .= '.'.$strend;
					
				}
		}
		if(($len % 3)==0){
			
				$strtop = substr($str,0,3);
				$strmain = substr($str,3);
				$str = $strmain;
				$number .= $strtop;
				for($i=0;$i<$dem-1;$i++){
					$strend = substr($str,0,3);
					$strmain = substr($str,3);
					$str = $strmain;
					if($i != $len-1) $number .= '.'.$strend;
					
				}
		}
		return $number;
	}
?>